using System;
using SMS.SMPPClient.PDU.Incoming;

namespace SMS.SMPPClient.PDU.Incoming
{
    /// <summary>
    /// Represents a generic NACK sent by the SMSC.
    /// </summary>
    public class SMPPGenericNackR : SMPPResponse
    {

        /// <summary>
        /// Creates a generic_nack response PDU.
        /// </summary>
        public SMPPGenericNackR(byte[] response)
            : base(response)
        {
            DecodeSMSCResponse();
        }

        /// <summary>
        /// Decodes the generic NACK response from the SMSC.  Since a generic
        /// NACK response contains essentially nothing other than the header,
        /// this method does nothing special.  It will grab any TLVs that are in
        /// the PDU, however.
        /// </summary>
        protected override void DecodeSMSCResponse()
        {
            tlvTable.TranslateTLVDataIntoTable(ResponseAfterHeader);
        }
    }
}
